package com.hgts.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hgts.common.R;
import com.hgts.pojo.Book;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hgts.pojo.dto.BookDto;
import com.hgts.pojo.dto.TypeDto;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 凡哥哥
 * @since 2023-04-27
 */
public interface IBookService extends IService<Book> {

    R<Page> pageInfo(int page, int pageSize, String name);

    R<List<TypeDto>> getType();

    R<String> addBook(Book book);

    R<Book> getBook(int id);

    R<String> updateBook(Book book);

    R<String> deleteBooks(int... ids);

    R<String> libraryBook(BookDto bookDto);

    R<String> createBookOrder(BookDto bookDto);
    R<String> returnBook(int id);

    R<String> dleBooks(int... ids);

    R<Page> pageInfoWx(Long id,Integer page, Integer pageSize);
}

